var login = {
  loc: localStorageFn(),
  save: function () {
    $('#rember').click(function () {
      var u = $('#inputUser').val();
      var p = $('#inputPassword').val();
      if (u && p) {
        if (this.checked) {
          loc.set('rember', {
            rember: true,
            user: u,
            password: p
          });
        }
      }

    });
  },
  loadSave: function () {
    var saveInfo = loc.get('rember');
    var u = saveInfo.user;
    var p = saveInfo.password;
  },
  login: function () {
    var that = this;
    $('#login').click(function () {
      // that.setAlertText('账号不存在，请确认输入账号');
      that.setAlertText('密码错误，请验证密码');
      that.modalShow();
    });
  },
  setAlertText: function (t) {
    $('#alertText').text(t);
  },
  modalShow: function () {
    $('#alertInfo').modal('show');
  },
  init: function () {
    var that = this;
    that.loadSave();
    that.save();
    that.login();
  }
};

login.init();